﻿Public Class SettingsForm

    Private Sub SettingsForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        styles.SelectedItem = My.Settings.style
        If My.Settings.style = "Visual Studio" Then
            stylepicture.Image = My.Resources.vs
        ElseIf My.Settings.style = "Aero Black" Then
            stylepicture.Image = My.Resources.aeroblack
        ElseIf My.Settings.style = "Microsoft Office" Then
            stylepicture.Image = My.Resources.msoffice
        End If

        If My.Settings.professional = True Then
            CheckBox1.Checked = False
        Else
            CheckBox1.Checked = True
        End If

    End Sub

    Private Sub styles_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles styles.SelectedIndexChanged
        If styles.SelectedItem = "Visual Studio" Then
            stylepicture.Image = My.Resources.vs
        ElseIf styles.SelectedItem = "Aero Black" Then
            stylepicture.Image = My.Resources.aeroblack
        ElseIf styles.SelectedItem = "Microsoft Office" Then
            stylepicture.Image = My.Resources.msoffice
        End If
        Label1.Visible = True
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If styles.SelectedItem = "Visual Studio" Then
            My.Settings.style = "Visual Studio"
        ElseIf styles.SelectedItem = "Aero Black" Then
            My.Settings.style = "Aero Black"
        ElseIf styles.SelectedItem = "Microsoft Office" Then
            My.Settings.style = "Microsoft Office"
        End If

        If CheckBox1.Checked = True Then
            My.Settings.professional = False
        Else
            My.Settings.professional = True
        End If

        My.Settings.Save()
        Me.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()
    End Sub
End Class